package com.tangyuan.feignapis.user;

import com.tangyuan.common.result.Result;
import com.tangyuan.model.User;
import com.tangyuan.vo.MyInfoMissionVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(name = "service-user",contextId = "user")
public interface IUserFeignClient {
    
    @PostMapping("/feignApi/user/deleteUserVideoCollectionByVideoId/{videoId}")
    void deleteUserVideoCollectionByVideoId(@PathVariable("videoId") Long videoId);
    
    @PostMapping("/feignApi/user/deleteUserActionByVideoId/{videoId}")
    void deleteUserActionByVideoId(@PathVariable("videoId") Long videoId);

    @GetMapping("/feignApi/user/getUserById")
    User getUserById(@RequestParam(value = "userId") Long userId);

    @GetMapping("/feignApi/user/getUserListByLastSql")
    List<User> getUserListByLastSql(@RequestParam(value = "lastSql") String lastSql);

    @GetMapping("/feignApi/user/saveRobotNum")
    Result saveRobotNum(@RequestParam(value = "param") String param);

    @GetMapping("/feignApi/user/getUserListByIds")
    Map<Long,User> getUserListById(@RequestParam(value = "userIds") List<Long> userIds);

    @GetMapping("/feignApi/user/getMyInfoMission")
    Result<MyInfoMissionVo> getMyInfoMission(@RequestParam Long userId);
}
